package conf

import (
	"flag"
	"github.com/BurntSushi/toml"
)

type Config struct {
	AppName string `toml:"appname"`
	NameSpace string `toml:"namespace"`
	Listen string `toml:"listen"`
}


var AppConfig *Config

var confPath = flag.String("conf", "", "your config file")

func Init() error {
	if _,err := toml.DecodeFile(*confPath, &AppConfig);err != nil{
		return err
	}
	return nil
}